#ifndef __OLED_H
#define __OLED_H

#include "driver/i2c.h"
#include "font.h"

// I2C 配置参数
#define OLED_I2C_PORT        I2C_NUM_0
#define OLED_I2C_ADDRESS     0x3C    // 通常为0x3C或0x3D
#define OLED_SCL_PIN         36      // 根据实际连接修改
#define OLED_SDA_PIN         40      // 根据实际连接修改
#define OLED_FREQ_HZ         100000  // I2C频率

// 函数声明
void OLED_I2C_Init(void);
void OLED_WriteCommand(uint8_t Command);
void OLED_WriteData(uint8_t Data);
void OLED_SetCursor(uint8_t Y, uint8_t X);
void OLED_Clear(void);
void OLED_ShowChar(uint8_t Line, uint8_t Column, char Char);
void OLED_ShowString(uint8_t Line, uint8_t Column, char *String);
void OLED_ShowNum(uint8_t Line, uint8_t Column, uint32_t Number, uint8_t Length);
void OLED_ShowSignedNum(uint8_t Line, uint8_t Column, int32_t Number, uint8_t Length);
void OLED_ShowHexNum(uint8_t Line, uint8_t Column, uint32_t Number, uint8_t Length);
void OLED_ShowBinNum(uint8_t Line, uint8_t Column, uint32_t Number, uint8_t Length);
void OLED_Init(void);

#endif
